package com.shensi.adminCollect.controller.station;

import com.shensi.common.core.controller.BaseController;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.domain.ResultData;
import com.shensi.common.core.page.TableDataInfo;
import com.shensi.adminCollect.domain.station.vo.SuperPayOrderVO;
import com.shensi.adminCollect.service.station.ISuperPayOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @date 2023/12/26
 */
@RestController
@RequestMapping("/appUserSuperPayOrder")
public class AppUserSuperPayOrderController extends BaseController {

    @Autowired
    private ISuperPayOrderService superPayOrderService;

    @GetMapping("list")
    public TableDataInfo list(SuperPayOrderVO superPayOrderVO){
        startPage();
        return getDataTable(superPayOrderService.queryList(superPayOrderVO));
    }

    @GetMapping("export")
    public AjaxResult export(SuperPayOrderVO superPayOrderVO){
        return superPayOrderService.export(superPayOrderVO);
    }

    @GetMapping("refund")
    public ResultData refund(@RequestParam Integer id){
        superPayOrderService.refund(id);
        return ResultData.success();
    }

}
